package org.flashamaphone.voices.waveformFactories
{
	/** Generate a square wave cycle */
	public class SquareWaveFactory extends WaveFactory
	{
		/**
		 * sample a sin wave at a phase
		 */
		public override function sample(phase:Number):Number {
			return Math.floor(Math.sin(phase));
		}
	}
}